Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pyupgrade] Document more fix unsafety for UP007 #9306

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninja hauntsaninja commented Dec 29, 2023

from typing import Optional
x = "asdf"
def foo(a: Optional[x]):
    pass

It's not uncommon to see issues like this with multiprocessing, where things are actually methods instead of types

Relates to #8482

```
from typing import Optional
x = "asdf"
def foo(a: Optional[x]):
    pass
```
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Dec 29, 2023
@charliermarsh charliermarsh merged commit ec88acc into astral-sh:main Dec 29, 2023
17 checks passed
@charliermarsh
Copy link
Member

Thanks!

@hauntsaninja hauntsaninja deleted the up007-unsafe branch December 29, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants